package com.ynny.service;

import com.ynny.bean.StudentBean;
import com.ynny.dao.StudentDaoImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    StudentDaoImpl studentDaoImpl;

    @Override
    public Integer addStudentService(String number, String name, String grade, String clbum, String gender) {
        return studentDaoImpl.addStudentCount(number, name, grade, clbum, gender);
    }

    @Override
    public Integer updateNameStudentService(String name,String number, String grade, String clbum, String gender ,String name1) {
        return studentDaoImpl.updateNameStudentCount(name, number, grade, clbum, gender, name1);
    }

    @Override
    public StudentBean selectById(Integer id) {
        return studentDaoImpl.selectById(id);
    }

    @Override
    public List<StudentBean> selectAllStudent() {
        return studentDaoImpl.selectAllStudent();
    }


}
